<?php

namespace Client\Form;

use \Zend\Form\Form;

class ClientQueryForm extends Form
{
    public function __construct($name = null, $options = array())
    {
        parent::__construct($name, $options);
        $this->setAttribute('method', 'get');
        $this->add(array(
            'name' => 'paging',
            'attributes' => array(
                'id' => 'paging',
                'type' => 'number',
                'value' => 0,
            ),
        ));

        $this->add(array(
            'name' => 'column',
            'type' => 'Zend\Form\Element\Select',
            'attributes' => array(
                'id' => 'column',
                'class' => 'form-control',
            ),
            'options' => array(
                'label' => '',
                'value_options' => array(
                    '' => '请选择查询项',
                    'client_id' => '身份证号',
                    'client_name' => '姓名',
                    'client_city' => '城市'
                )
            )
        ));

        $this->add(array(
            'name' => 'parame',
            'attributes' => array(
                'type' => 'text',
                'id' => 'parame',
                'class' => 'form-control',
                'placeholder' => '请输入检索关键词',
            ),
        ));

        $this->add(array(
            'name' => 'submit',
            'attributes' => array(
                'type' => 'submit',
                'value' => '检索',
                'id' => 'submit',
                'class' => 'btn btn-primary',
            ),
        ));
    }
}